Repository navigation
use support header abTest to determine "log in" text - #17368
AnastasiiaBalenko wants to merge 5 commits into
Conversation
| linkCssOverrides?: SerializedStyles; | ||
| buttonCssOverrides?: SerializedStyles; | ||
| children?: React.ReactNode; | ||
| renderTrigger?: (isExpanded: boolean) => React.ReactNode; |
There was a problem hiding this comment.
leftover props from the previous sign-in header test, that we don't need any more
| showSignInTextOnMobile={showSignInTextOnMobile ?? false} | ||
| isSignInReady={ | ||
| !showReaderRevenueLinks || | ||
| showSignInTextOnMobile !== undefined |
There was a problem hiding this comment.
We need this prop to avoid showing the wrong sign-in presentation while the support header is loading
There was a problem hiding this comment.
🟡 Changes recommended
Sign-in can remain hidden indefinitely when prerequisites fail, and the relocated profile icon no longer opens the account menu.
4 open issues
What changed in this PR
This PR connects the masthead’s mobile sign-in presentation to the support-header A/B test and simplifies the signed-in account dropdown.
Changes:
- Select mobile sign-in text or icon from support-header metadata, with readiness gating and text fallback for empty or failed responses.
- Keep “My account” text visible for signed-in users on mobile.
- Remove unused dropdown customization props and update related tests.
| File | Description |
|---|---|
dotcom-rendering/src/components/TopBarSupport.island.tsx |
Reports the experiment decision and fallback state; ignores cancelled results. |
dotcom-rendering/src/components/TopBarMyAccount.tsx |
Adds sign-in readiness gating and simplifies the account control. |
dotcom-rendering/src/components/TopBarMyAccount.test.tsx |
Covers readiness, text fallback, and the signed-in label. |
dotcom-rendering/src/components/TopBar.island.tsx |
Connects support-header state to sign-in presentation. |
dotcom-rendering/src/components/Dropdown.test.tsx |
Removes the obsolete custom-trigger test. |
dotcom-rendering/src/components/Dropdown.island.tsx |
Removes custom trigger and button/link styling props. |
Review effort: Balanced
🚀 Image for dotcom-rendering pushed to AWS ECRImage digest: 🐛 Run the image locallyThe following can be used to run the image locally: # Refer to image using the immutable digest. Find alternatives below.
IMAGE_IDENTIFIER="@sha256:11f3361f9007a54f99f1b8c862d02bf262865d1cc2b170b10ae83d67d1d44abc"
# Refer to image using branch tag
# IMAGE_IDENTIFIER=":branch-ab-header-sign-in-test"
# Refer to image using build tag
# IMAGE_IDENTIFIER=":build-35177"
# Set environment variables for the AWS CLI
AWS_PROFILE="<A_PROFILE_FROM_JANUS>"
AWS_DEFAULT_REGION="eu-west-1"
IMAGE_ACCOUNT_ID=$(aws ssm get-parameter --name /organisation/accounts/artifacts --query "Parameter.Value" --output text)
REGISTRY="${IMAGE_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
IMAGE="${REGISTRY}/guardian/dotcom-rendering/dotcom-rendering${IMAGE_IDENTIFIER}"
# Login to AWS ECR https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html
aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY
# Pull the image
docker pull $IMAGE
# Run the image. You'll likely need to set additional flags. See https://docs.docker.com/reference/cli/docker/container/run.
docker run $IMAGEFrom guardian/actions-ecr. |
068ac7b to
abaf67f
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Local fixtures cover only SINGLE_FRONT_DOOR__HEADER, leaving the external HEADER_MOBILE_SIGN_IN name and whether every non-CONTROL variant requires icon-only sign-in dependent on human confirmation.
3 resolved since last review
Review effort: Balanced
cf586a5 to
b04cdb2
Compare
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |


What does this change?
This change updates the logic to use the support header’s AB test name and variant to choose the mobile sign-in presentation, hide the sign-in control until the header request completes; show the text fallback when it returns no data or fails, keeps “My account” text visible for signed-in users on mobile, removes unused customisation props from Dropdown and its obsolete custom-trigger test.
Why?
The Icon without text should be shown for all variants of the support header test in RRCP that starts with "HEADER_MOBILE_SIGN_IN" and is not the "CONTROL" variant for Logged out users. For all the other cases nothing is changed.
How has this change been tested?
Screenshots
Logged in




In TEST and VARIANT
In TEST and CONTROL
Not in the test